package com.example.baserecyclerviewadapterdemo.anim;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.view.View;
import android.view.animation.DecelerateInterpolator;

import com.chad.library.adapter.base.animation.BaseAnimation;

import org.jetbrains.annotations.NotNull;

public class CustomAnimation1 implements BaseAnimation {
    @NotNull
    @Override
    public Animator[] animators(@NotNull View view) {
        Animator scaleX = ObjectAnimator.ofFloat(view,"scaleX",1.3f,1);
        Animator scaleY = ObjectAnimator.ofFloat(view,"scaleY",1.3f,1);
        Animator alpha = ObjectAnimator.ofFloat(view,"alpha",0,1f);

        scaleX.setDuration(350);
        scaleY.setDuration(350);
        alpha.setDuration(350);

        scaleX.setInterpolator(new DecelerateInterpolator());
        scaleY.setInterpolator(new DecelerateInterpolator());
        return new Animator[]{scaleX,scaleY,alpha};
    }
}
